package com.ningkang.ums.controller;

import com.ningkang.common.domain.ums.UserVo;
import com.ningkang.common.result.Result;
import com.ningkang.ums.domain.VisitorEntity;
import com.ningkang.ums.service.VisitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @ClassName VisitorController
 * @Description 描述 就诊人控制层
 * @Author guoxin
 * @Date 2024/10/17 20:01
 */
@RestController
@RequestMapping("/visitor")
@Validated
public class VisitorController {
    @Autowired
    private VisitorService visitorService;

    /* *
     * @Title: createVisitor
     * @Author: DELL
     * @Date: 2024-10-18 11:25:10
     * @Params: [visitorEntity]
     * @Return: Result
     * @Description: 添加就诊人信息
     */
    @PostMapping("/createVisitor")
    public Result createVisitor(@Valid @RequestBody VisitorEntity visitorEntity) {
        visitorService.createVisitor(visitorEntity);
        return Result.success(null, "添加成功");
    }
}
